package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 文章评论表(BookComment)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-12 14:19:02
 */
@ApiModel("文章评论表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BookComment implements Serializable {
    private static final long serialVersionUID = -26236616034907113L;
        /**
    *主键
    * 评论id
    * isnull 1
    */
    @ApiModelProperty(value="评论id",position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
    * 评论人userId
    * isnull 0
    */        @ApiModelProperty(value="评论人userId",position=2)
    private String userId;
    /**
    * 评论的书籍id
    * isnull 0
    */        @ApiModelProperty(value="评论的书籍id",position=3)
    private String bookId;
    /**
    * 被评论的章节id
    * isnull 0
    */        @ApiModelProperty(value="被评论的章节id",position=4)
    private String chapterId;
    /**
    * 父评论id
    * isnull 0
    */        @ApiModelProperty(value="父评论id",position=5)
    private String parentCommentId;
    /**
    * 父评论的用户id
    * isnull 0
    */        @ApiModelProperty(value="父评论的用户id",position=6)
    private String parentCommentUserId;
    /**
    * 被回复的评论id
    * isnull 0
    */        @ApiModelProperty(value="被回复的评论id",position=7)
    private String replyCommentId;
    /**
    * 被回复的评论用户id
    * isnull 0
    */        @ApiModelProperty(value="被回复的评论用户id",position=8)
    private String replyCommentUserId;
    /**
    * 评论等级[ 1 一级评论 默认 ，2 二级评论]
    * isnull 0
    */        @ApiModelProperty(value="评论等级[ 1 一级评论 默认 ，2 二级评论]",position=9)
    private Integer commentLevel;
    /**
    * 评论的内容
    * isnull 0
    */        @ApiModelProperty(value="评论的内容",position=10)
    private String content;
    /**
    * 状态 (1 有效，0 逻辑删除)
    * isnull 0
    */        @ApiModelProperty(value="状态 (1 有效，0 逻辑删除)", position=11)
    private Integer status;
    /**
    * 点赞数
    * isnull 0
    */        @ApiModelProperty(value="点赞数",position=12)
    private Integer praiseNum;
    /**
    * 置顶状态[ 1 置顶，0 不置顶 默认 ]
    * isnull 0
    */        @ApiModelProperty(value="置顶状态[ 1 置顶，0 不置顶 默认 ]",position=13)
    private Integer topStatus;
    /**
    * 创建时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="创建时间",position=14)
    private LocalDateTime createTime;
        
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }
        
    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }
        
    public String getParentCommentId() {
        return parentCommentId;
    }

    public void setParentCommentId(String parentCommentId) {
        this.parentCommentId = parentCommentId;
    }
        
    public String getParentCommentUserId() {
        return parentCommentUserId;
    }

    public void setParentCommentUserId(String parentCommentUserId) {
        this.parentCommentUserId = parentCommentUserId;
    }
        
    public String getReplyCommentId() {
        return replyCommentId;
    }

    public void setReplyCommentId(String replyCommentId) {
        this.replyCommentId = replyCommentId;
    }
        
    public String getReplyCommentUserId() {
        return replyCommentUserId;
    }

    public void setReplyCommentUserId(String replyCommentUserId) {
        this.replyCommentUserId = replyCommentUserId;
    }
        
    public Integer getCommentLevel() {
        return commentLevel;
    }

    public void setCommentLevel(Integer commentLevel) {
        this.commentLevel = commentLevel;
    }
        
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
        
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
        
    public Integer getPraiseNum() {
        return praiseNum;
    }

    public void setPraiseNum(Integer praiseNum) {
        this.praiseNum = praiseNum;
    }
        
    public Integer getTopStatus() {
        return topStatus;
    }

    public void setTopStatus(Integer topStatus) {
        this.topStatus = topStatus;
    }
        
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"id\":" + id +
                                  " ,\"userId\":" + userId +
                            " ,\"bookId\":" + bookId +
                            " ,\"chapterId\":" + chapterId +
                            " ,\"parentCommentId\":" + parentCommentId +
                            " ,\"parentCommentUserId\":" + parentCommentUserId +
                            " ,\"replyCommentId\":" + replyCommentId +
                            " ,\"replyCommentUserId\":" + replyCommentUserId +
                            " ,\"commentLevel\":" + commentLevel +
                            " ,\"content\":" + content +
                            " ,\"status\":" + status +
                            " ,\"praiseNum\":" + praiseNum +
                            " ,\"topStatus\":" + topStatus +
                            " ,\"createTime\":" + createTime +
                  '}';
    }


}
